---
id: debugging
title: Debugging - Python SDK
sidebar_label: Debugging
description: Learn how to debug Workflows in development and production environments using the Temporal Python SDK, Web UI, Temporal CLI, replay, tracing, logging, and performance metrics.
toc_max_heading_level: 2
keywords:
  - debugging temporal python
  - temporal web ui
  - temporal cli
  - workflow replay
  - tracing workflows
  - logging workflows
  - worker performance metrics
  - server performance metrics
tags:
  - Debugging
  - Python SDK
  - Temporal SDKs
---

This page shows how to do the following:

- [Debug in a development environment](#debug-in-a-development-environment)
- [Debug in a production environment](#debug-in-a-production-environment)

### Debug in a development environment {#debug-in-a-development-environment}

**How to debug in a development environment using the Temporal Python SDK.**

When developing Workflows, you can use the normal development tools of logging and a debugger to see what’s happening in your Workflow.
In addition to the normal development tools of logging and a debugger, you can also see what’s happening in your Workflow by using the [Web UI](/web-ui) or [Temporal CLI](/cli).

### How to debug in a production environment {#debug-in-a-production-environment}

**How to debug in a production environment using the Temporal Python SDK.**

You can debug production Workflows using:

- [Web UI](/web-ui)
- [Temporal CLI](/cli)
- [Replay](/develop/python/testing-suite#replay)
- [Tracing](/develop/python/observability#tracing)
- [Logging](/develop/python/observability#logging)

You can debug and tune Worker performance with metrics and the [Worker performance guide](/develop/worker-performance).
For more information, see [Observability ▶️ Metrics](/develop/python/observability#metrics) for setting up SDK metrics.

Debug Server performance with [Cloud metrics](/cloud/metrics/) or [self-hosted Server metrics](/self-hosted-guide/production-checklist#scaling-and-metrics).
